package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 组织表
 * @TableName org
 */
@TableName(value ="org")
@Data
public class Org implements Serializable {
    /**
     * 流水号
     */
    @TableId
    private String id;

    /**
     * 节点语义ID
     */
    private String cascadeid;

    /**
     * 组织名称
     */
    private String name;

    /**
     * 热键
     */
    private String hotkey;

    /**
     * 父节点名称
     */
    private String parentname;

    /**
     * 是否叶子节点
     */
    private Integer isleaf;

    /**
     * 是否自动展开
     */
    private Integer isautoexpand;

    /**
     * 节点图标文件名称
     */
    private String iconname;

    /**
     * 当前状态
     */
    private Integer status;

    /**
     * 业务对照码
     */
    private String bizcode;

    /**
     * 自定义扩展码
     */
    private String customcode;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 创建人ID
     */
    private Integer createid;

    /**
     * 排序号
     */
    private Integer sortno;

    /**
     * 父节点流水号
     */
    private String parentid;

    /**
     * 分类名称
     */
    private String typename;

    /**
     * 分类ID
     */
    private String typeid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Org other = (Org) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCascadeid() == null ? other.getCascadeid() == null : this.getCascadeid().equals(other.getCascadeid()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getHotkey() == null ? other.getHotkey() == null : this.getHotkey().equals(other.getHotkey()))
            && (this.getParentname() == null ? other.getParentname() == null : this.getParentname().equals(other.getParentname()))
            && (this.getIsleaf() == null ? other.getIsleaf() == null : this.getIsleaf().equals(other.getIsleaf()))
            && (this.getIsautoexpand() == null ? other.getIsautoexpand() == null : this.getIsautoexpand().equals(other.getIsautoexpand()))
            && (this.getIconname() == null ? other.getIconname() == null : this.getIconname().equals(other.getIconname()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getBizcode() == null ? other.getBizcode() == null : this.getBizcode().equals(other.getBizcode()))
            && (this.getCustomcode() == null ? other.getCustomcode() == null : this.getCustomcode().equals(other.getCustomcode()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getCreateid() == null ? other.getCreateid() == null : this.getCreateid().equals(other.getCreateid()))
            && (this.getSortno() == null ? other.getSortno() == null : this.getSortno().equals(other.getSortno()))
            && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid()))
            && (this.getTypename() == null ? other.getTypename() == null : this.getTypename().equals(other.getTypename()))
            && (this.getTypeid() == null ? other.getTypeid() == null : this.getTypeid().equals(other.getTypeid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCascadeid() == null) ? 0 : getCascadeid().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getHotkey() == null) ? 0 : getHotkey().hashCode());
        result = prime * result + ((getParentname() == null) ? 0 : getParentname().hashCode());
        result = prime * result + ((getIsleaf() == null) ? 0 : getIsleaf().hashCode());
        result = prime * result + ((getIsautoexpand() == null) ? 0 : getIsautoexpand().hashCode());
        result = prime * result + ((getIconname() == null) ? 0 : getIconname().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getBizcode() == null) ? 0 : getBizcode().hashCode());
        result = prime * result + ((getCustomcode() == null) ? 0 : getCustomcode().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getCreateid() == null) ? 0 : getCreateid().hashCode());
        result = prime * result + ((getSortno() == null) ? 0 : getSortno().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getTypename() == null) ? 0 : getTypename().hashCode());
        result = prime * result + ((getTypeid() == null) ? 0 : getTypeid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cascadeid=").append(cascadeid);
        sb.append(", name=").append(name);
        sb.append(", hotkey=").append(hotkey);
        sb.append(", parentname=").append(parentname);
        sb.append(", isleaf=").append(isleaf);
        sb.append(", isautoexpand=").append(isautoexpand);
        sb.append(", iconname=").append(iconname);
        sb.append(", status=").append(status);
        sb.append(", bizcode=").append(bizcode);
        sb.append(", customcode=").append(customcode);
        sb.append(", createtime=").append(createtime);
        sb.append(", createid=").append(createid);
        sb.append(", sortno=").append(sortno);
        sb.append(", parentid=").append(parentid);
        sb.append(", typename=").append(typename);
        sb.append(", typeid=").append(typeid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}